package io.github.libkodi.vertxauth;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

import io.github.libkodi.vertxauth.data.AuthDataCenter;
import io.github.libkodi.vertxauth.filter.Abc;
import io.vertx.core.Future;
import io.vertx.core.Vertx;
import io.vertx.redis.client.Redis;
import io.vertx.redis.client.RedisOptions;

public class Test {
	public static void main(String[] args) throws IOException, ClassNotFoundException {
		Vertx vertx = Vertx.vertx();
		Redis redis = Redis.createClient(vertx, new RedisOptions().addConnectionString("redis://localhost:6379/1"));
		AuthDataCenter data = new AuthDataCenter(redis);
		
		Abc abc = new Abc(22);
		
		data.setValue("abc", true).onSuccess(v -> {
			System.out.println("success");
			vertx.close();
		}).onFailure(e -> {
			e.printStackTrace(System.err);
			vertx.close();
		});
	}
}
